package com.rockcent.service.impl;

import com.rockcent.mall.lib.domain.MallMemberRechargeFlow;
import com.rockcent.mall.lib.repository.MallMemberRechargeFlowRepository;
import com.rockcent.service.MallMemberRechargeFlowSrv;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by zhangjh on 2017/3/10.
 */
@Service
public class MallMemberRechargeFlowSrvImpl implements MallMemberRechargeFlowSrv {

    @Autowired
    private MallMemberRechargeFlowRepository mallMemberRechargeFlowRepository;

    @Override
    public MallMemberRechargeFlow findTop1BySeqNo(String seqNo) {
        return mallMemberRechargeFlowRepository.findTop1BySeqNo(seqNo);
    }

    @Override
    public MallMemberRechargeFlow findTop1ByMallMemberIdByLastUpdatedDesc(Long mallMemberId) {
        return mallMemberRechargeFlowRepository.findTop1ByMallMemberIdOrderByLastUpdatedDesc(mallMemberId);
    }
}
